import 'package:flutter/material.dart';
import '../tabs.dart';
class registerThreepage extends StatefulWidget {
  const registerThreepage({super.key});

  @override
  State<registerThreepage> createState() => _registerThreepageState();
}

class _registerThreepageState extends State<registerThreepage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('注册第三步')),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text('注册第三步'),
            ElevatedButton(
              onPressed: () {
                //返回根路由
                Navigator.of(context).pushAndRemoveUntil(
                  MaterialPageRoute(builder: (context){
                    return MyTabs(index: 3,);
                  })
                  , (route) => false);
              },
              child: Text('完成注册'),
            ),
          ],
        ),
      ),
    );
  }
}
